Skip to content

Conversation

@chulkilee
Copy link
Contributor

Fixes #927

As LESS does not import CSS into scope where @import is called, and HTML
ouput loads both default and night CSS, text color is incorrectly shown.

To avoid that, embed the whole tomorrow-night CSS (BSD-3-Clause)

https://raw.githubusercontent.com/highlightjs/highlight.js/master/src/styles/tomorrow-night.css


Note that this is copying BSD-3-Clause code into Apache 2. We anyway bundle it, so it is not adding new licensing issue, I believe.

As LESS does not import CSS into scope where @import is called, and HTML
ouput loads both default and night CSS, text color is incorrectly shown.

To avoid that, embed the whole tomorrow-night CSS (BSD-3-Clause)

https://raw.githubusercontent.com/highlightjs/highlight.js/master/src/styles/tomorrow-night.css
@josevalim
Copy link
Member

Thanks! Shall we embed the other theme for consistency too?

@chulkilee
Copy link
Contributor Author

Unlike tomorrow-night, tomorrow is imported in two places - app.less and epub.less. We may have own less file, and include them - but not sure that's more consistent.

I think it's better to take more refactoring, such as using top-level class or including style based on the theme selection. However, I haven't digged into epub output, and JS part of it, which is required to make that change.

If it works, then we may merge it and leave more refactoring to others :)

@josevalim josevalim merged commit 3dd27ea into elixir-lang:master Dec 21, 2018
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@chulkilee chulkilee deleted the embed-tomorrow-night-css branch October 29, 2022 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants